package nixonftp;

import java.io.IOException;
import java.net.UnknownHostException;
import java.util.HashMap;
import sun.net.ftp.FtpLoginException;
import sun.net.ftp.FtpProtocolException;

public interface NXSocketClient {
	public void connect(String sgInitialDir) throws FtpLoginException, FtpProtocolException, UnknownHostException, IOException;
	public void setCredentials(String[] credentials);
	public String[] getCredentials();

	public HashMap getObjectIndex();

	public byte[] get(String remoteFile, String localFile, boolean preview, NXProgressUpdateRunnable callBack) throws IOException, FtpProtocolException;
	public void put(String localFile, String remoteFile, NXProgressUpdateRunnable callBack) throws IOException, FtpProtocolException;

	public int indexDirectory(String dir) throws Exception;
	public void fakeDirectory(NXObjectIndex oi, String path);

	public void createDirectory(String dir) throws IOException;
	public void changeFolder(String dir) throws Exception;
	public void cdUp() throws IOException;
	public void deleteDirectory(String dir) throws IOException, FtpProtocolException;
	public void renameImpl(String oldFile, String newFile) throws IOException, FtpProtocolException;
	public void delete(String file) throws IOException, FtpProtocolException;

	public boolean isDirectory(String dir);
	public void disconnect();
	public String getCurrDir();

	public void stopCurrent();
	public String getWelcome();
}
